﻿using System.Web;
using PoliticalClassifier.Web.Validation;

namespace PoliticalClassifier.Web.Models
{
	/// <summary>
	/// Represents an uploaded data file.
	/// </summary>
	/// <remarks>
	/// This view-model class is used to facilitate the transfer of data between views and controllers.  It contains an uploaded data file for use by the <see cref="PoliticalClassifier.Application.PoliticalClassifierModeler" />.
	/// </remarks>
	public class LoadFileViewModel
	{
		/// <summary>
		/// Uploaded data file.
		/// </summary>
		/// <value>
		/// This is a required property, representing the file being uploaded to the server for processing.  The file is required to be a Microsoft Excel Workbook, with the file extension .xlsx.  The uploaded file must be larger than 0B and less than the server's HTTP request length limit.
		/// </value>
		[File(ErrorMessage = "Please select an Excel Spreadsheet.", Extensions = new string[] { ".xlsx" })]
		public HttpPostedFileBase File { get; set; }
	}
}